home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / var / log / scripts / checkinstall-1.6.0-i486-2 < prev    next >
Encoding:
Text File  |  2008-11-21  |  396 b   |  14 lines

  1. #!/bin/sh
  2. config() {
  3.   NEW="$1"
  4.   OLD="$(dirname $NEW)/$(basename $NEW .new)"
  5.   # If there's no config file by that name, mv it over:
  6.   if [ ! -r $OLD ]; then
  7.     mv $NEW $OLD
  8.   elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
  9.     rm $NEW
  10.   fi
  11.   # Otherwise, we leave the .new copy for the admin to consider...
  12. }
  13. config etc/checkinstall/checkinstallrc.new
  14.